﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.Entity.ModelConfiguration;


namespace CubicFWNet.Data.Models.Mapping
{
    public class MaterialFormatMap : EntityTypeConfiguration<MaterialFormat>
    {
        public MaterialFormatMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            this.Property(t => t.Format)
                .HasMaxLength(256);

            this.Property(t => t.Memo)
                .HasMaxLength(256);

            // Table & Column Mappings
            this.ToTable("MaterialFormat");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.MaterialId).HasColumnName("MaterialId");
            this.Property(t => t.Amount).HasColumnName("Amount");
            this.Property(t => t.Length).HasColumnName("Length");
            this.Property(t => t.Width).HasColumnName("Width");
            this.Property(t => t.Format).HasColumnName("Format");
            this.Property(t => t.Memo).HasColumnName("Memo");
            this.Property(t => t.Area).HasColumnName("Area");
        }
    }
}
